const Sequelize = require('sequelize');
// const comment = require('./comment');
module.exports = function(sequelize, DataTypes) {
  return sequelize.define('leixing', {
    id: {
      autoIncrement: true,
      type: DataTypes.INTEGER.UNSIGNED,
      allowNull: false,
      primaryKey: true,
      comment:"视频分类主键ID"
    },
    t_name: {
      type: DataTypes.STRING(255),
      allowNull: false
    },
    t_type: {
      type: DataTypes.STRING(50),
      allowNull: false
    }
  }, {
    sequelize,
    tableName: 'leixing',
    timestamps: false,
    indexes: [
      {//新增的部分，参照其他model修改。不太明白这里的这个内容是有标准定义，这里作为传参吗？？又没有找到定义的类或者函数
        name: "PRIMARY",
        unique: true,
        using: "BTREE",
        fields: [
          { name: "id" },
        ]
      },
    ]
  });
};
